package thread;


import com.heima.model.user.pojo.ApUser;

public class CommentThreadLocalUtil {

    private static final ThreadLocal<ApUser> WM_USER_THREAD_LOCAL = new ThreadLocal<>();


    //存入数据
    public static void setUser(ApUser ApUser){
        WM_USER_THREAD_LOCAL.set(ApUser);
    }


    //获取数据
    public static ApUser getUser(){
        return WM_USER_THREAD_LOCAL.get();
    }


    //清理数据
    public static void clear(){
        WM_USER_THREAD_LOCAL.remove();
    }
}
